﻿var DXDefaultThemeCookieName = "BlackGlass";
function DXGetCookieValue(name) {
    var cookie = " " + document.cookie;
    var search = " " + name + "=";
    var setStr = null;
    var offset = 0;
    var end = 0;
    if (cookie.length > 0) {
        offset = cookie.indexOf(search);
        if (offset != -1) {
            offset += search.length;
            end = cookie.indexOf(";", offset)
            if (end == -1) {
	            end = cookie.length;
            }
            setStr = unescape(cookie.substring(offset, end));
        }
    }
    return setStr;
}
function DXGetCurrentThemeCookieName() {
    if(_aspxIsExists(DXCurrentThemeCookieName))
        return DXCurrentThemeCookieName;
    return DXDefaultThemeCookieName;
}
function DXGetCurrentThemeFromCookies() {
    return DXGetCookieValue(DXGetCurrentThemeCookieName());
}
function DXSaveCurrentThemeToCookies(name) {
    document.cookie = DXGetCurrentThemeCookieName() + "=" + name + "; expires=Thu, 13 Sep 3007 14:07:07 GMT; path=/";
}
function detect_enterkey(btn)
{
    if( typeof( e ) == "undefined" && typeof( window.event ) != "undefined" )
        e = window.event;

    if (e.keyCode == 13)
      btn.DoClick();
    return true;
}
function TreeClick(event)
{
    var obj = event.srcElement || event.target;
    var seltreeNode = obj; 
    alert(seltreeNode.outer); //This will prompt selected Node Text
    //seltreeNode.innerHTML = "Rajesh Babu"; //This will change the selected node text as “Rajesh Babu”
}


        
